Optimal. Leaf size=28 \[ \frac{(a-b) \sin (c+d x)}{d}+\frac{b \tanh ^{-1}(\sin (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0327812, antiderivative size = 28, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.158, Rules used = {3676, 388, 206} \[ \frac{(a-b) \sin (c+d x)}{d}+\frac{b \tanh ^{-1}(\sin (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3676
Rule 388
Rule 206
Rubi steps
\begin{align*} \int \cos (c+d x) \left (a+b \tan ^2(c+d x)\right ) \, dx &=\frac{\operatorname{Subst}\left (\int \frac{a-(a-b) x^2}{1-x^2} \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac{(a-b) \sin (c+d x)}{d}+\frac{b \operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac{b \tanh ^{-1}(\sin (c+d x))}{d}+\frac{(a-b) \sin (c+d x)}{d}\\ \end{align*}
Mathematica [A] time = 0.025269, size = 47, normalized size = 1.68 \[ \frac{a \sin (c) \cos (d x)}{d}+\frac{a \cos (c) \sin (d x)}{d}-\frac{b \sin (c+d x)}{d}+\frac{b \tanh ^{-1}(\sin (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.037, size = 44, normalized size = 1.6 \begin{align*}{\frac{\sin \left ( dx+c \right ) a}{d}}-{\frac{\sin \left ( dx+c \right ) b}{d}}+{\frac{b\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.08571, size = 62, normalized size = 2.21 \begin{align*} \frac{b{\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right ) - 2 \, \sin \left (d x + c\right )\right )} + 2 \, a \sin \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.53931, size = 115, normalized size = 4.11 \begin{align*} \frac{b \log \left (\sin \left (d x + c\right ) + 1\right ) - b \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \,{\left (a - b\right )} \sin \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \tan ^{2}{\left (c + d x \right )}\right ) \cos{\left (c + d x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.68142, size = 65, normalized size = 2.32 \begin{align*} \frac{b{\left (\log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) - \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) - 2 \, \sin \left (d x + c\right )\right )} + 2 \, a \sin \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]